<!DOCTYPE html>
<html>
{include file="public/head" /}
<body class="zanpian-body">
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="callout callout-title">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <h4>{$nav.title}</h4>
                {notempty name="nav.remark"}
                <p>{$nav.remark}</p>
                {/notempty}
</div>  
<div class="panel-body">
<div class="panel-tool">
<div class="row">
              <div class="col-md-6 col-sm-6 col-xs-12 mb15">
                <div id="toolbar" class="toolbar">
                <a href="{:url('index')}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a> <a href="{:url('add')}" data-name="添加配置" class="btn btn-success btn-add btn-editone"><i class="fa fa-plus"></i> 添加</a> <button type="button" id="plupload-addon-0" class="btn btn-navy plupload" data-url="{:url('import')}" data-mimetype="application/octet-stream" data-multiple="false" initialized="true" style="position: relative; z-index: 1;"><i class="fa fa-upload"></i> 导入</button> <a  href="{:url('del')}" form="#list" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-trash"></i> 删除</a><span id="selectedChks">已选择<strong></strong>记录</span>
                </div>
                <!-- /.toolbar -->
              </div>


            </div>

</div>
<!-- /.panel-tool -->
    <div class="tab-content" id="contents">
              <form id="list" method="post">
              <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                  <thead>
                    <tr style="height:45px;">
                                  <th style="text-align:center;vertical-align: middle; width:5%"> <label class="pretty success">
                <input type="checkbox" id="checkall" class="delcheckall">
                <label><i class="mdi mdi-check"></i></label>
                </label>
              </th>
                    <th style="text-align:center;vertical-align: middle;">词库名称</th>
                    <th style="text-align:center;vertical-align: middle;">词库标识</th>
                    <th style="text-align:center;vertical-align: middle;">词库个数</th>
                    <th style="text-align:center;vertical-align: middle;">数据大小</th>
                    <th style="text-align:center;vertical-align: middle;">修改时间</th>
                    <th style="text-align:center;vertical-align: middle;">添加时间</th>
                    <th style="text-align:center;vertical-align: middle;">操作</th>
                    </tr>
                 </thead>                
               <tbody>
               {notempty name="list"} 
              {volist name="list" id="data"}
               <tr>   
              <td class="bs-checkbox" style="text-align:center;vertical-align:middle; font-size:14px"><label class="pretty success">
              <input type="checkbox" name="id[]" value="{$data.name}" id="checkbox">
              <label><i class="mdi mdi-check"></i></label>
              </label></td> 
                  <td align="center">{$data.title}</td>     
                  <td align="center">{$data.name}</td>
                  <td align="center">{$data.count}</td>
                  <td align="center">{$data.size|format_bytes}</td>
                  <td align="center">{$data.uptime|date='Y-m-d H:i:s',###}</td>
                   <td align="center">{$data.addtime|date='Y-m-d H:i:s',###}</td>
                  <td align="center"><a href="{:url('export',array('name'=>$data.name))}" class="btn btn-default btn-xs">导出</a>
                  

                  
                   <button type="button" id="plupload-addon-{$key+1}" class="btn btn-default btn-xs plupload" data-url="{:url('merge',array('name'=>$data.name))}" data-mimetype="application/octet-stream" data-multiple="false" initialized="true" style="position: relative; z-index: 1;"> 导入</button> <a href="{:url('edit',array('name'=>$data.name))}"  data-name="编辑" class="btn btn-success btn-editone btn-xs"><i class="fa fa-pencil"></i> 编辑</a> <a href="{:url('del',array('id'=>$data.name))}" class="confirm btn btn-danger btn-xs confirm ajax-post"><i class="fa fa-trash-o"></i> 删除</a></td>  
                  
              </tr>
{/volist} 
                {else/}<tr><td align="center" colspan="7" >抱歉，没有找到相关备份文件！</td></tr>{/notempty}
            </tbody>
                </table>
              </form>
            </div>
         </div>
         <!-- /.panel-body --> 
        </div>
        </div>
        </section>
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.all();
	$(".plupload").each(function(){
	zanpian.upload.api.plupload("#"+$(this).attr("id"), function(data, ret) {	
			layer.msg(ret.msg ? ret.msg : '导入成功', {zIndex:layer.zIndex,icon: 1,time: 500}, function() {
			    if (ret.url) {
				    zanpian.api.url(ret.url);
			    }
			});				
	});
	});
});	
</script>
</body>
</html>
